import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/mining_user_statisticstwo_entity.dart';

MiningUserStatisticstwoEntity $MiningUserStatisticstwoEntityFromJson(
    Map<String, dynamic> json) {
  final MiningUserStatisticstwoEntity miningUserStatisticstwoEntity = MiningUserStatisticstwoEntity();
  final int? inputStone = jsonConvert.convert<int>(json['inputStone']);
  if (inputStone != null) {
    miningUserStatisticstwoEntity.inputStone = inputStone;
  }
  final int? outputStone = jsonConvert.convert<int>(json['outputStone']);
  if (outputStone != null) {
    miningUserStatisticstwoEntity.outputStone = outputStone;
  }
  final int? yesterdayOutputStone = jsonConvert.convert<int>(
      json['yesterdayOutputStone']);
  if (yesterdayOutputStone != null) {
    miningUserStatisticstwoEntity.yesterdayOutputStone = yesterdayOutputStone;
  }
  final int? waitOutputStone = jsonConvert.convert<int>(
      json['waitOutputStone']);
  if (waitOutputStone != null) {
    miningUserStatisticstwoEntity.waitOutputStone = waitOutputStone;
  }
  final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
  if (updatedAt != null) {
    miningUserStatisticstwoEntity.updatedAt = updatedAt;
  }
  final int? stoneNum = jsonConvert.convert<int>(json['stoneNum']);
  if (stoneNum != null) {
    miningUserStatisticstwoEntity.stoneNum = stoneNum;
  }
  final double? amount = jsonConvert.convert<double>(json['amount']);
  if (amount != null) {
    miningUserStatisticstwoEntity.amount = amount;
  }
  return miningUserStatisticstwoEntity;
}

Map<String, dynamic> $MiningUserStatisticstwoEntityToJson(
    MiningUserStatisticstwoEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['inputStone'] = entity.inputStone;
  data['outputStone'] = entity.outputStone;
  data['yesterdayOutputStone'] = entity.yesterdayOutputStone;
  data['waitOutputStone'] = entity.waitOutputStone;
  data['updatedAt'] = entity.updatedAt;
  data['stoneNum'] = entity.stoneNum;
  data['amount'] = entity.amount;
  return data;
}

extension MiningUserStatisticstwoEntityExt on MiningUserStatisticstwoEntity {
  MiningUserStatisticstwoEntity copyWith({
    int? inputStone,
    int? outputStone,
    int? yesterdayOutputStone,
    int? waitOutputStone,
    int? updatedAt,
    int? stoneNum,
    double? amount,
  }) {
    return MiningUserStatisticstwoEntity()
      ..inputStone = inputStone ?? this.inputStone
      ..outputStone = outputStone ?? this.outputStone
      ..yesterdayOutputStone = yesterdayOutputStone ?? this.yesterdayOutputStone
      ..waitOutputStone = waitOutputStone ?? this.waitOutputStone
      ..updatedAt = updatedAt ?? this.updatedAt
      ..stoneNum = stoneNum ?? this.stoneNum
      ..amount = amount ?? this.amount;
  }
}